<?xml version="1.0" encoding="ascii"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
          "DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
  <title>digichef.voting.managers.CoalesceWrapper</title>
  <link rel="stylesheet" href="epydoc.css" type="text/css" />
  <script type="text/javascript" src="epydoc.js"></script>
</head>

<body bgcolor="white" text="black" link="blue" vlink="#204080"
      alink="#204080">
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

      <th class="navbar" width="100%"></th>
  </tr>
</table>
<table width="100%" cellpadding="0" cellspacing="0">
  <tr valign="top">
    <td width="100%">
      <span class="breadcrumbs">
        <a href="digichef-module.html">Package&nbsp;digichef</a> ::
        <a href="digichef.voting-module.html">Package&nbsp;voting</a> ::
        <a href="digichef.voting.managers-module.html">Module&nbsp;managers</a> ::
        Class&nbsp;CoalesceWrapper
      </span>
    </td>
    <td>
      <table cellpadding="0" cellspacing="0">
        <!-- hide/show private -->
        <tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink"
    onclick="toggle_private();">hide&nbsp;private</a>]</span></td></tr>
        <tr><td align="right"><span class="options"
            >[<a href="frames.html" target="_top">frames</a
            >]&nbsp;|&nbsp;<a href="digichef.voting.managers.CoalesceWrapper-class.html"
            target="_top">no&nbsp;frames</a>]</span></td></tr>
      </table>
    </td>
  </tr>
</table>
<!-- ==================== CLASS DESCRIPTION ==================== -->
<h1 class="epydoc">Class CoalesceWrapper</h1><p class="nomargin-top"><span class="codelink"><a href="digichef.voting.managers-pysrc.html#CoalesceWrapper">source&nbsp;code</a></span></p>
<center>
<center>  <map id="uml_class_diagram_for_digichef_64" name="uml_class_diagram_for_digichef_64">
<area shape="rect" href="javascript:void(0);" title="django.db.models.sql.aggregates.Aggregate.is_ordinal" alt="" coords="57,28,313,47"/>
<area shape="rect" href="javascript:void(0);" title="django.db.models.sql.aggregates.Aggregate.is_computed" alt="" coords="57,47,313,65"/>
<area shape="rect" href="javascript:void(0);" title="django.db.models.sql.aggregates.Aggregate.relabel_aliases" alt="" coords="57,68,313,87"/>
<area shape="rect" href="javascript:void(0);" title="Return the aggregate, rendered as SQL." alt="" coords="57,87,313,105"/>
<area shape="rect" href="javascript:void(0);" title="Default SQL Aggregate." alt="" coords="56,11,315,107"/>
<area shape="rect" href="digichef.voting.managers.CoalesceWrapper-class.html#sql_template" title="digichef.voting.managers.CoalesceWrapper.sql_template" alt="" coords="17,153,353,172"/>
<area shape="rect" href="digichef.voting.managers.CoalesceWrapper-class.html#__init__" title="Instantiate an SQL aggregate" alt="" coords="17,175,353,193"/>
<area shape="rect" href="digichef.voting.managers.CoalesceWrapper-class.html#default_alias" title="digichef.voting.managers.CoalesceWrapper.default_alias" alt="" coords="17,193,353,212"/>
<area shape="rect" href="digichef.voting.managers.CoalesceWrapper-class.html#add_to_query" title="digichef.voting.managers.CoalesceWrapper.add_to_query" alt="" coords="17,212,353,231"/>
<area shape="rect" href="digichef.voting.managers.CoalesceWrapper-class.html" title="digichef.voting.managers.CoalesceWrapper" alt="" coords="16,136,355,232"/>
</map>
  <img src="uml_class_diagram_for_digichef_64.gif" alt='' usemap="#uml_class_diagram_for_digichef_64" ismap="ismap" class="graph-without-title" />
</center>
</center>
<hr />
<!-- ==================== INSTANCE METHODS ==================== -->
<a name="section-InstanceMethods"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Instance Methods</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-InstanceMethods"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="digichef.voting.managers.CoalesceWrapper-class.html#__init__" class="summary-sig-name">__init__</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">lookup</span>,
        <span class="summary-sig-arg">**extra</span>)</span><br />
      Instantiate an SQL aggregate</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="digichef.voting.managers-pysrc.html#CoalesceWrapper.__init__">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr class="private">
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="_default_alias"></a><span class="summary-sig-name">_default_alias</span>(<span class="summary-sig-arg">self</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="digichef.voting.managers-pysrc.html#CoalesceWrapper._default_alias">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="default_alias"></a><span class="summary-sig-name">default_alias</span>(<span class="summary-sig-arg">self</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="digichef.voting.managers-pysrc.html#CoalesceWrapper.default_alias">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="add_to_query"></a><span class="summary-sig-name">add_to_query</span>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">query</span>,
        <span class="summary-sig-arg">alias</span>,
        <span class="summary-sig-arg">col</span>,
        <span class="summary-sig-arg">source</span>,
        <span class="summary-sig-arg">is_summary</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="digichef.voting.managers-pysrc.html#CoalesceWrapper.add_to_query">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
  <tr>
    <td colspan="2" class="summary">
    <p class="indent-wrapped-lines"><b>Inherited from <code>django.db.models.sql.aggregates.Aggregate</code></b>:
      <code>as_sql</code>,
      <code>relabel_aliases</code>
      </p>
    <p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
      <code>__delattr__</code>,
      <code>__format__</code>,
      <code>__getattribute__</code>,
      <code>__hash__</code>,
      <code>__new__</code>,
      <code>__reduce__</code>,
      <code>__reduce_ex__</code>,
      <code>__repr__</code>,
      <code>__setattr__</code>,
      <code>__sizeof__</code>,
      <code>__str__</code>,
      <code>__subclasshook__</code>
      </p>
    </td>
  </tr>
</table>
<!-- ==================== CLASS VARIABLES ==================== -->
<a name="section-ClassVariables"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Class Variables</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-ClassVariables"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a name="sql_template"></a><span class="summary-name">sql_template</span> = <code title="'COALESCE(%(function)s(%(field)s), %(default)s)'">'COALESCE(%(function)s(%(field)s), %(default)s)'</code>
    </td>
  </tr>
  <tr>
    <td colspan="2" class="summary">
    <p class="indent-wrapped-lines"><b>Inherited from <code>django.db.models.sql.aggregates.Aggregate</code></b>:
      <code>is_computed</code>,
      <code>is_ordinal</code>
      </p>
    </td>
  </tr>
</table>
<!-- ==================== PROPERTIES ==================== -->
<a name="section-Properties"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Properties</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-Properties"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
  <tr>
    <td colspan="2" class="summary">
    <p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
      <code>__class__</code>
      </p>
    </td>
  </tr>
</table>
<!-- ==================== METHOD DETAILS ==================== -->
<a name="section-MethodDetails"></a>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Method Details</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-MethodDetails"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
</table>
<a name="__init__"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">__init__</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">lookup</span>,
        <span class="sig-arg">**extra</span>)</span>
    <br /><em class="fname">(Constructor)</em>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="digichef.voting.managers-pysrc.html#CoalesceWrapper.__init__">source&nbsp;code</a></span>&nbsp;
    </td>
  </tr></table>
  
  <pre class="literalblock">
Instantiate an SQL aggregate

 * col is a column reference describing the subject field
   of the aggregate. It can be an alias, or a tuple describing
   a table and column name.
 * source is the underlying field or aggregate definition for
   the column reference. If the aggregate is not an ordinal or
   computed type, this reference is used to determine the coerced
   output type of the aggregate.
 * extra is a dictionary of additional data to provide for the
   aggregate definition

Also utilizes the class variables:
 * sql_function, the name of the SQL function that implements the
   aggregate.
 * sql_template, a template string that is used to render the
   aggregate into SQL.
 * is_ordinal, a boolean indicating if the output of this aggregate
   is an integer (e.g., a count)
 * is_computed, a boolean indicating if this output of this aggregate
   is a computed float (e.g., an average), regardless of the input
   type.

</pre>
  <dl class="fields">
    <dt>Overrides:
        object.__init__
        <dd><em class="note">(inherited documentation)</em></dd>
    </dt>
  </dl>
</td></tr></table>
</div>
<br />
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

      <th class="navbar" width="100%"></th>
  </tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" width="100%%">
  <tr>
    <td align="left" class="footer">
    Generated by Epydoc 3.0.1 on Thu Apr  1 02:28:28 2010
    </td>
    <td align="right" class="footer">
      <a target="mainFrame" href="http://epydoc.sourceforge.net"
        >http://epydoc.sourceforge.net</a>
    </td>
  </tr>
</table>

<script type="text/javascript">
  <!--
  // Private objects are initially displayed (because if
  // javascript is turned off then we want them to be
  // visible); but by default, we want to hide them.  So hide
  // them unless we have a cookie that says to show them.
  checkCookie();
  // -->
</script>
</body>
</html>
